<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=xLKXReXwhwqBnVXz0EcanRik1T9XTm73"></script>
    <style>
        *{margin:0;padding:0;}
        html,body{
            height:100%;
        }
        #container{
        height:100%;
    }
    </style>
</head>
<body>
    <div id="container"></div>
    <script>
    var map=new BMap.Map("container");//创建地图实例
    var point = new BMap.Point(114.379449, 30.69541); //设置中心点坐标
    map.centerAndZoom(point, 15);  //地图初始化，同时设置地图展示级别
    map.enableScrollWheelZoom(true);   //开启鼠标滚轮缩放
    map.addControl(new BMap.NavigationControl());    //平移缩放控件
    map.addControl(new BMap.ScaleControl());  //比例尺
    map.addControl(new BMap.OverviewMapControl());  //缩略地图
    map.addControl(new BMap.MapTypeControl());//地图类型
    var marker = new BMap.Marker(point);        // 创建标注    
    map.addOverlay(marker);                     // 将标注添加到地图中 
    marker.addEventListener("click", function(){    
    alert("欢迎来到湖北大学知行学院");    
    marker.setAnimation(BMAP_ANIMATION_BOUNCE)
});  
    </script>
</body>
</html>